﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace _0512063_0512082
{
    public partial class SampleSave : Form
    {
        private String content;
        private Boolean choice;
        public SampleSave(String content)
        {
            this.content = content;
            InitializeComponent();
        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            SampleLoader.saveSample(content, txtName.Text);
            choice = true;
            this.Close();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            choice = false;
            this.Close();
        }

        public bool ShowSaveDialog(Form parent){
            this.ShowDialog(parent);
            return choice;
        }
    }
}
